<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>10-Vue中使用插槽</title>
	<script src="vue.js"></script>
</head>
<body>
	<div id="root">
		<child>
			<div slot="header">header</div>
			<div slot="footer">footer</div>
		</child>
	</div>
</body>
<script>
	Vue.component('child',{
		template:
		`<div>
			<slot name='header'></slot>
			<p>content</p>
			<slot name='footer'></slot>
		</div>`,
		
	})
	var vm=new Vue({
		el:'#root',
		methods:{
			
		}
	})
</script>
</html>